import axios from '../axios';

/** *********根据需求获取协议******** */
export const getContractById = (params) => axios.post('dz-mall/r/agreement/contract/get', {
  type: params.type, // 协议类型
  id: params.id, // 非必传
  code: params.code, // 非必传
}, {
  loading: true
});

/** *********富文本文件签约留痕协议中心******** */
export const signWithContent = (params) => axios.postBody('dz-mall/r/agreement/contract/signWithContent', {
  id: params.id,
  content: params.content, // 非必传
  batchNo: params.batchNo, // 非必传
  source: params.source // 非必传
}, {
  loading: true
});

/** *********普通文件签约留痕协议中心******** */
export const signWithFile = (params) => axios.post('dz-mall/r/agreement/contract/signWithFile', {
  id: params.id,
  batchNo: params.batchNo, // 非必传
  source: params.source // 非必传
}, {
  loading: true
});

/** *********根据需求获取基金资料概要******** */
export const getfundSummaryById = (params) => axios.post('dz-mall/r/agreement/fundSummary/get', {
  type: params.type, // 协议类型
  id: params.id, // 非必传
  code: params.code, // 非必传
}, {
  loading: true
});

/** *********基金资料概要留痕******** */
export const signfundSummaryById = (params) => axios.post('dz-mall/r/agreement/fundSummary/sign', {
  id: params.id,
  batchNo: params.batchNo, // 非必传
  source: params.source // 非必传
}, {
  loading: true
});